package com.ruoyi.mall.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.PmsCategoryMapper;
import com.ruoyi.mall.domain.PmsCategory;
import com.ruoyi.mall.service.IPmsCategoryService;

/**
 * 商品类别Service业务层处理
 * 
 * @author fdk
 * @date 2023-09-13
 */
@Service
public class PmsCategoryServiceImpl implements IPmsCategoryService 
{
    @Autowired
    private PmsCategoryMapper pmsCategoryMapper;

    /**
     * 查询商品类别
     * 
     * @param id 商品类别主键
     * @return 商品类别
     */
    @Override
    public PmsCategory selectPmsCategoryById(Long id)
    {
        return pmsCategoryMapper.selectPmsCategoryById(id);
    }

    /**
     * 查询商品类别列表
     * 
     * @param pmsCategory 商品类别
     * @return 商品类别
     */
    @Override
    public List<PmsCategory> selectPmsCategoryList(PmsCategory pmsCategory)
    {
        return pmsCategoryMapper.selectPmsCategoryList(pmsCategory);
    }

    /**
     * 新增商品类别
     * 
     * @param pmsCategory 商品类别
     * @return 结果
     */
    @Override
    public int insertPmsCategory(PmsCategory pmsCategory)
    {
        return pmsCategoryMapper.insertPmsCategory(pmsCategory);
    }

    /**
     * 修改商品类别
     * 
     * @param pmsCategory 商品类别
     * @return 结果
     */
    @Override
    public int updatePmsCategory(PmsCategory pmsCategory)
    {
        return pmsCategoryMapper.updatePmsCategory(pmsCategory);
    }

    /**
     * 批量删除商品类别
     * 
     * @param ids 需要删除的商品类别主键
     * @return 结果
     */
    @Override
    public int deletePmsCategoryByIds(Long[] ids)
    {
        return pmsCategoryMapper.deletePmsCategoryByIds(ids);
    }

    /**
     * 删除商品类别信息
     * 
     * @param id 商品类别主键
     * @return 结果
     */
    @Override
    public int deletePmsCategoryById(Long id)
    {
        return pmsCategoryMapper.deletePmsCategoryById(id);
    }
}
